package org.sang.controller;

import org.sang.beans.Menu;
import org.sang.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/config")
public class ConfigController {
    @Autowired
    MenuService menuService;

    /**
     * 动态菜单
     * @return
     */
    @RequestMapping("/sysmenu")
    @ResponseBody
    public List<Menu> sysmenu(){
        return menuService.getMenusByUserId();
    }





}
